const express = require('express')
const router = express.Router()
const fn = require('../router_handler/user')
const expressJoi = require('@escook/express-joi')
const { reg_login, upDataUserinfo, upDataPWd, img } = require('../schema/user')
const Info = require('../router_handler/userinfo')

router.post('/reguser', expressJoi(reg_login), fn.reguser,)
router.post('/login', expressJoi(reg_login), fn.login,)
router.get('/getuserInfo', Info.getuserInfo)
router.post('/upDataUserData', expressJoi(upDataUserinfo), Info.upDatauserInfo)
router.post('/upDataPwd', expressJoi(upDataPWd), Info.upDataPwd)
router.post('/userPic', expressJoi(img), Info.pic)
module.exports = router